package com.samoiloff.framework.commands {
	import flash.events.Event;

	/**
	 * @author Samoiloff  http://samoiloff.com/
	 */
	public class CommandEvent extends Event {
		
		public static const ACTION_START:String = "actionStart";
		public static const ACTION_COMPLETE:String = "actionComplete";
		public static const ACTION_CANCEL:String = "actionCancel";
		
		public static const ACTIONS_START:String = "actionsStart";
		public static const ACTIONS_COMPLETE:String = "actionsComplete";
		public static const ACTIONS_CANCEL:String = "actionsCancel";
		
		private var _action : Command;
		
		public function CommandEvent(type : String, action:Command, bubbles : Boolean = false, cancelable : Boolean = false) {
			super(type, bubbles, cancelable);

			_action = action;
		}
		
		
		override public function clone() : Event {
			return new CommandEvent(type, _action, bubbles, cancelable);
		}

		public function get action() : Command {
			return _action;
		}
		
	}
}
